package org.luxor.commons.playwright.listener;

import com.microsoft.playwright.Page;
import org.luxor.commons.playwright.component.Context;
import org.luxor.commons.playwright.component.command.PlaywrightCommand;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.annotation.Order;

/**
 * Playwright 事件监听器抽象类
 *
 * @author Mr.yan  @date 2022/4/10
 */
@Order(-1)
public class AbstractPlaywrightEventListener implements PlaywrightEventListener {
    private final Logger log = LoggerFactory.getLogger(this.getClass());

    public AbstractPlaywrightEventListener() {
    }

    @Override
    public void beforeExecute(Page page, PlaywrightCommand command, Context context) throws Exception {
    }

    @Override
    public void afterExecute(Page page, PlaywrightCommand command, Context context) throws Exception {
    }

    @Override
    public void onException(Throwable throwable, Page page) {
    }

}
